

  import { useStore, mapState } from 'vuex'
  import { computed } from 'vue'
  export function useState(arr) {
    const store = useStore()
    const mapFn = mapState(arr)
    const storState = {}
    Object.keys(mapFn).forEach(key => {
      const fn = mapFn[key].bind({$store: store})
      storState[key] = computed(fn)
    })
    return storState
  }

